#ifndef __MARS_GRAPHICS_SHADER_PARAMETER_H__
#define __MARS_GRAPHICS_SHADER_PARAMETER_H__

#include "MarsObject.h"
#include "MarsType.h"

namespace Graphics
{

class VRamBuffer;

enum ShaderSemantic
{
	SS_WorldMatrix,
	SS_ViewMatrix,
	SS_ProjMatrix,
	SS_WorldViewProjMatrix,
	SS_WorldInvTransposeMatrix,
	SS_ShadowTransform,
	SS_EyeWorldPosition,
	SS_DirectionalLight,
	SS_Material,
};

class ShaderParameter : public Core::Object
{
public:
									ShaderParameter( const char* strName, Core::uint32 iSlot, Core::uint32 iOffset, Core::uint32 iSize, Core::uint32 iCount );
									~ShaderParameter();

	const std::string&				GetName() const;
	Core::uint32					GetSlot() const;
	Core::uint32					GetOffset() const;
	Core::uint32					GetSize() const;
	Core::uint32					GetCount() const;

	static Core::uint32				GetParameterName( ShaderSemantic semantic );

private:
	std::string						m_strName;
	Core::uint32					m_iSlot;
	Core::uint32					m_iOffset;
	Core::uint32					m_iSize;
	Core::uint32					m_iCount;
};

inline ShaderParameter::ShaderParameter( const char* strName, Core::uint32 iSlot, Core::uint32 iOffset, Core::uint32 iSize, Core::uint32 iCount )
: m_strName( strName )
, m_iSlot( iSlot )
, m_iOffset( iOffset )
, m_iSize( iSize )
, m_iCount( iCount )
{
	m_strName = strName;
}

inline ShaderParameter::~ShaderParameter()
{
}

inline const std::string& ShaderParameter::GetName() const
{
	return m_strName;
}

inline Core::uint32 ShaderParameter::GetSlot() const
{
	return m_iSlot;
}

inline Core::uint32 ShaderParameter::GetOffset() const
{
	return m_iOffset;
}

inline Core::uint32 ShaderParameter::GetSize() const
{
	return m_iSize;
}

inline Core::uint32 ShaderParameter::GetCount() const
{
	return m_iCount;
}

} // end of namespace Graphics

#endif // end of #ifndef __MARS_GRAPHICS_SHADER_PARAMETER_H__